﻿// ****************************************************************************** //
//        Module to handle the state of the whole game (also for load/save)       //
// ****************************************************************************** //

module GameState

open Microsoft.Xna.Framework
open Microsoft.Xna.Framework.Input
open Microsoft.Xna.Framework.Graphics
open Utilities
open Casanova
open Coroutines
open Math
open SI
open MapGrid


type GameState = 
  {
    mutable river_position       : bool
    mutable Life                 : int
    mutable winbox_check         : bool[]
    mutable count_win            : int //how many boxes filled so far?
    mutable time_counter         : float32
    mutable level                : int
  }

let mutable game_state =
  {
    river_position = false
    Life = 3
    winbox_check = [|false;false;false;false;false|]
    count_win = 0
    time_counter = 0.0f
    level = 1
  }

let reset_state() =
     game_state <-
        {
            river_position = false
            Life = 3
            winbox_check = [|false;false;false;false;false|]
            count_win = 0
            time_counter = 0.0f
            level = 1
        }
